package com.my.study.designPatterns.proxyPattern.dynamicProxy;


import java.util.HashMap;
import java.util.Map;

/**
 * 被代理的接口类的实现类
 **/
public class UserServiceImp implements UserService {

    @Override
    public String getUserById(Integer id) {

        return ALL_USERS.get(id);
    }


    public static final Map<Integer, String> ALL_USERS = new HashMap<>();

    {
        ALL_USERS.put(1, "Spencer");
        ALL_USERS.put(2, "Toby");
    }


}